<template>

    <el-button size="default" type="default" @click="backToList()">返回</el-button>

    <el-descriptions column="2">
        <el-descriptions-item label="头像">
            <el-image :src="dataDetail.headUrl"></el-image>
        </el-descriptions-item>

    </el-descriptions>

    <el-descriptions column="3">
        <el-descriptions-item label="id：">{{ dataDetail.id }}</el-descriptions-item>
        <el-descriptions-item label="用户名：">{{ dataDetail.userName }}</el-descriptions-item>
        <el-descriptions-item label="账号：">{{ dataDetail.account }}</el-descriptions-item>
        <el-descriptions-item label="真实姓名：">{{ dataDetail.realName }}</el-descriptions-item>
        <el-descriptions-item label="身份证号：">{{ dataDetail.identityNum }}</el-descriptions-item>
        <el-descriptions-item label="邮箱：">{{ dataDetail.email }}</el-descriptions-item>
        <el-descriptions-item label="电话：">{{ dataDetail.phone }}</el-descriptions-item>
        <el-descriptions-item label="状态：">{{ statusMap.get(dataDetail.status) }}</el-descriptions-item>
        <el-descriptions-item label="信用分：">{{ dataDetail.credit }}</el-descriptions-item>
        <el-descriptions-item label="注册时间：">{{ dataDetail.gmtCreateTime }}</el-descriptions-item>
    </el-descriptions>


    <el-form-item>
        <el-button type="primary" @click="resetForm()">
            回归正常
        </el-button>
        <el-button type="danger" @click="submitForm()">
            禁用账号
        </el-button>
        <el-button type="danger" @click="submitForm()">
            拉入黑名单
        </el-button>
    </el-form-item>

</template>

<script setup>

import { ref } from 'vue';
import router from "@/api/routerConfig";

const loginUserId = ref("")
const loginUserName = ref("")


const typeMap = ref(new Map([
    ['1', "求助"],
    ['2', "教程"],
    ['3', "讨论"],
    ['4', "分享"],
    ['5', "其他"]
]))

const statusMap = ref(new Map([
    ['0', "未支付"],
    ['1', "待卖家发货"],
    ['2', "待买家确认发货"],
    ['3', "售后处理中"],
    ['4', "已完成"],
    ['5', "已取消"]
]))

const reqParam = ref({
    loginUserId: "",
    loginUserName: "",
    creatorId: "",
    creatorName: "",
    gmtCreateTime: "",
    modifierId: "",
    modifierName: "",
    gmtModifyTime: "",
    id: "",
    title: "",
    type: "",
    content: "",
    tagIds: "",
    tagIdList: [],
    fileUrls: "",
    fileUrlList: [],
    status: "",
    backReason: "",
    saveType: ""
})

const dataDetail = ref({
    id: "1",
    commodityId: "1",
    status: "1",
    saleManId: "4",
    saleManName: "卖家",
    purchaseManId: "5",
    purchaseManName: "买家",
    num: 1,
    perPrice: 14.0,
    totalPrice: 14.0,
    otherContent: "备注备注",
    creatorId: "888",
    creatorName: "创建人",
    gmtCreateTime: "2023—01-23",
    modifierId: "",
    modifierName: "",
    gmtModifyTime: ""
})

const tagList = ref([
    {
        id: "1",
        name: "阴阳师",
        type: "1",
        hotCount: 0,
        creatorId: "",
        creatorName: "",
        gmtCreateTime: "",
        modifierId: "",
        modifierName: "",
        gmtModifyTime: ""
    },
    {
        id: "2",
        name: "只狼",
        type: "1",
        hotCount: 0,
        creatorId: "",
        creatorName: "",
        gmtCreateTime: "",
        modifierId: "",
        modifierName: "",
        gmtModifyTime: ""
    },
    {
        id: "3",
        name: "美妆",
        type: "2",
        hotCount: 0,
        creatorId: "",
        creatorName: "",
        gmtCreateTime: "",
        modifierId: "",
        modifierName: "",
        gmtModifyTime: ""
    }
])

function backToList() {
    router.back()
}


</script>


<style scoped>

</style>